package FlyWeight;

/**
 * @author duanzhizhou
 * @date 2024/11/5
 */
public class client {
    
    public static void main(String[] args) {
        WebsiteFactory factory = new WebsiteFactory();
        Website a = factory.create("门户");
        Website b = factory.create("门户");
        Website c = factory.create("博客");
        Website d = factory.create("博客");
        a.run(new User("张三"));
        c.run(new User("李四"));
        System.out.println(factory.size());
    }
}
